class MessagesController < ApplicationController
  before_action :logged_in?
  layout "user"
  def create
  end

  def destroy
  end



  def update
    @message = Message.find(params[:message][:id])

    if @message.update({:readed=>1})
      render :json=>{:stat=>1}
    else
      render :json=>{:stat=>0}
    end
  end
end
